package com.ls.markt.model.admin;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.io.Serializable;
import java.util.Date;

/**
 *  比赛实体类
 */
@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class Matchs implements Serializable {

    private static final long serialVersionUID = -128825532421119552L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY) // 自增长策略
    private Long id;

    private Long season;//赛季

    private int matchday;

    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date time;

    private Long homeTeam;//主队

    private Long awayTeam;

//    private String result;//比赛结果

    private int homeGoal;

    private int awayGoal;
}
